<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var nums = [100, 98, 10, 78, 65, 13, 98, 88, 90, 67];
        // function sx(a, b) {
        //     return (a - b);
        // }
        // nums.sort(sx);
        // var sum = 0;
        // for (i=1;i<nums.length-1;i++){
           
        //     sum+=nums[i]
        // }
        // console.log(sum/(nums.length-2));
        nums.sort(function(a,b){
            return(a-b);
        })
        console.log(nums);
        
        
    </script>
</body>

</html>